From b3974a28f39f535fae7a4fae14255a34a52569e8 Mon Sep 17 00:00:00 2001 From: Jeremy Bryant Date: Tue, 9 Apr 2024 22:54:39 +0100 Subject: [PATCH] Remove old backport version of universal-argument--description In preparation for the move to Emacs core, this is no longer needed. Furthermore, the backport was of emacs25 on 2015-12-04 so is unlikely to affect most current installations in the meantime. * which-key.el: Remove old backport of 2025-12-04. (which-key--full-prefix): Use built-in universal-argument--description. --- which-key.el | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/which-key.el b/which-key.el index 0e14c76df95..0d44a61020a 100644 --- a/which-key.el +++ b/which-key.el @@ -2194,32 +2194,13 @@ Actual lines: %s" (which-key--propertize (format "[%s paging/help]" key) 'face 'which-key-note-face)))) -(eval-and-compile - (if (fboundp 'universal-argument--description) - (defalias 'which-key--universal-argument--description - #'universal-argument--description) - (defun which-key--universal-argument--description () - ;; Backport of the definition of universal-argument--description in - ;; emacs25 on 2015-12-04 - (when prefix-arg - (concat "C-u" - (pcase prefix-arg - (`(-) " -") - (`(,(and (pred integerp) n)) - (let ((str "")) - (while (and (> n 4) (= (mod n 4) 0)) - (setq str (concat str " C-u")) - (setq n (/ n 4))) - (if (= n 4) str (format " %s" prefix-arg)))) - (_ (format " %s" prefix-arg)))))))) - (defun which-key--full-prefix (prefix-keys &optional -prefix-arg dont-prop-keys) "Return a description of the full key sequence up to now. Include prefix arguments." (let* ((left (eq which-key-show-prefix 'left)) (prefix-arg (if -prefix-arg -prefix-arg prefix-arg)) (str (concat - (which-key--universal-argument--description) + (universal-argument--description) (when prefix-arg " ") prefix-keys)) (dash (if (and (not (string= prefix-keys "")) -- 2.30.2